package com.zerox.sbdemo.service;

import com.zerox.sbdemo.mapper.FruitMapper;
import com.zerox.sbdemo.pojo.Fruit;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class FruitServiceImpl implements FruitService{
    @Autowired
    private FruitMapper fruitMapper;

    @Override
    public int add(Fruit fruit) {
        return fruitMapper.add(fruit);
    }

    @Override
    public int delete(Integer fruitID) {
        return fruitMapper.delete(fruitID);
    }

    @Override
    public int update(Fruit fruit) {
        return fruitMapper.update(fruit);
    }

    @Override
    public Fruit select(Integer fruitID) {
        return fruitMapper.select(fruitID);
    }

    @Override
    public List<Fruit> list() {
        return fruitMapper.list();
    }
}
